import request from '../utils/request'

export function getInfo(host) {
  return request({
    url: '/user/getInfo',
    method: 'get',
    params: { 'host': host }
  })
}

export function logout() {
  return request({
    url: '/user/logout',
    method: 'post'
  })
}

//参数:{auth_code:code,uuid:识别号,mchId:'',pluginId}
export function getTokenByCode(params) {
  return request({
    url: '/user/getTokenByCode',
    method: 'get',
    params: params
  })
}
export function sendMsg(params) {
  return request({
    url: '/user/sendMsg',
    method: 'post',
    params: params
  })
}

export function msgLogin(params) {
  return request({
    url: '/user/msgLogin',
    method: 'post',
    params: params
  })
}

export function register(params) {
  return request({
    url: '/user/tokenRegister',
    method: 'get',
    params: params
  })
}

export function update(params) {
        return request({
                url: '/user/update',
                method: 'post',
                params: params
        })
}

